﻿#include "FITKAbaAbstractSpringDashpot.h"



bool Interface::FITKAbaAbstractSpringDashpot::copy(FITKAbstractDataObject *obj)
{
    bool ok = FITKAbaWire::copy(obj);
    if (!ok)
        return false;
    FITKAbaAbstractSpringDashpot* sd = dynamic_cast<FITKAbaAbstractSpringDashpot*>(obj);
    if (sd == nullptr)
        return false;
    this->m_springStiffness = sd->m_springStiffness;
    this->m_daspotCoefficent = sd->m_daspotCoefficent;
    this->m_stiffnessState = sd->m_stiffnessState;
    this->m_daspotState = sd->m_daspotState;
    return ok;
}


namespace Interface {
double FITKAbaAbstractSpringDashpot::getSpringStiffness() const
{
    return m_springStiffness;
}

void FITKAbaAbstractSpringDashpot::setSpringStiffness(double newSpringStiffness)
{
    m_springStiffness = newSpringStiffness;
}

double FITKAbaAbstractSpringDashpot::getDaspotCoefficent() const
{
    return m_daspotCoefficent;
}

void FITKAbaAbstractSpringDashpot::setDaspotCoefficent(double newDaspotCoefficent)
{
    m_daspotCoefficent = newDaspotCoefficent;
}

bool FITKAbaAbstractSpringDashpot::getStiffnessState() const
{
    return m_stiffnessState;
}

bool FITKAbaAbstractSpringDashpot::getDaspotState() const
{
    return m_daspotState;
}

void FITKAbaAbstractSpringDashpot::setStiffnessState(bool state)
{
    m_stiffnessState = state;
}

void FITKAbaAbstractSpringDashpot::setDaspotState(bool state)
{
    m_daspotState = state;
}

}
